/*
 * Copyright 2002-2012 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.aop.framework;

import org.springframework.lang.Nullable;


/**
 *  配置的aop代理的委托接口，允许创建时机的代理对象和。
 *  现成的实现有 JDK的动态代理 和 cglib 的动态代理
 *
 *  具体应用的类：DefaultAopProxyFactory
 * @author 二十
 */
public interface AopProxy {

	/**
	 * 创建一个新的代理对象
	 * 使用aop代理的默认类加载器 通常是线程上下文类加载器。
	 */
	Object getProxy();

	/**
	 * 创建一个新的代理对象
	 * 使用给定的类加载器创建代理对象  如果传的是null ，实际上就是使用的上面的方法。
	 */
	Object getProxy(@Nullable ClassLoader classLoader);

}
